home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / src-server / wc_WIDGET.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-04  |  20.7 KB  |  538 lines

  1. /* -*-C-*-
  2. ********************************************************************************
  3. *
  4. * File:         wc_WIDGET.c
  5. * RCS:          $Header: wc_WIDGET.c,v 1.5 91/03/14 03:15:27 mayer Exp $
  6. * Description:  WIDGET_CLASS (the widget metaclass)
  7. * Author:       Niels Mayer, HPLabs
  8. * Created:      Tue Nov 21 00:55:07 1989
  9. * Modified:     Thu Oct  3 22:48:58 1991 (Niels Mayer) mayer@hplnpm
  10. * Language:     C
  11. * Package:      N/A
  12. * Status:       X11r5 contrib tape release
  13. *
  14. * WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. * XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. *
  17. * Permission to use, copy, modify, distribute, and sell this software and its
  18. * documentation for any purpose is hereby granted without fee, provided that
  19. * the above copyright notice appear in all copies and that both that
  20. * copyright notice and this permission notice appear in supporting
  21. * documentation, and that the name of Hewlett-Packard and David Betz not be
  22. * used in advertising or publicity pertaining to distribution of the software
  23. * without specific, written prior permission.  Hewlett-Packard and David Betz
  24. * make no representations about the suitability of this software for any
  25. * purpose. It is provided "as is" without express or implied warranty.
  26. *
  27. * HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  28. * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  29. * IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
  30. * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  31. * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  32. * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  33. * PERFORMANCE OF THIS SOFTWARE.
  34. *
  35. * See ./winterp/COPYRIGHT for information on contacting the authors.
  36. * Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  37. * Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
  38. *
  39. ********************************************************************************
  40. */
  41. static char rcs_identity[] = "@(#)$Header: wc_WIDGET.c,v 1.5 91/03/14 03:15:27 mayer Exp $";
  42.  
  43. #include <stdio.h>
  44. #include <Xm/Xm.h>
  45. #include "winterp.h"
  46. #include "user_prefs.h"
  47. #include "xlisp/xlisp.h"
  48. #include "w_funtab.h"
  49.  
  50. extern Widget Wcls_Get_WIDGETOBJ_Argument_Returning_Validated_WidgetID(); /* w_classes.c */
  51.  
  52. LVAL o_WIDGET_CLASS;        /* note -- this is used in w_classes.c */
  53. LVAL k_managed;
  54. LVAL k_unmanaged;
  55. LVAL k_dialog;
  56. LVAL k_scrolled;
  57.  
  58. /*
  59.  * Note -- various methods on WIDGET_CLASS are implemented in:
  60.  * w_libXt.c -- interfaces to Xtoolkit intrinsics.
  61.  * w_libXm.c -- interfaces to Motif toolkit.
  62.  * w_evnthndlr.c -- interfaces to event handling routines
  63.  */
  64.  
  65.  
  66. /******************************************************************************
  67.  * typedef struct
  68.  * {
  69.  *     int     reason;
  70.  *     XEvent  *event;
  71.  * } XmAnyCallbackStruct;
  72.  ******************************************************************************/
  73. static void Lexical_Bindings_For_XmAnyCallbackStruct(bindings_list, lexical_env, cd, o_widget)
  74.      LVAL bindings_list;    /* a list of symbols to which values from XmAnyCallbackStruct are bound */
  75.      LVAL lexical_env;        
  76.      XmAnyCallbackStruct* cd;
  77.      LVAL o_widget;        /* XLTYPE_WIDGETOBJ */
  78. {
  79.   extern LVAL s_CALLBACK_WIDGET, s_CALLBACK_REASON, s_CALLBACK_XEVENT; /* w_callbacks.c */
  80.   extern LVAL Wcb_Get_Callback_Reason_Symbol();    /* w_callbacks.c */
  81.   register LVAL s_bindname;
  82.  
  83.   for ( ; consp(bindings_list); bindings_list = cdr(bindings_list)) {
  84.  
  85.     s_bindname = car(bindings_list);
  86.  
  87.     if (s_bindname == s_CALLBACK_WIDGET) {
  88.       xlpbind(s_bindname, o_widget, lexical_env);
  89.     }
  90.     else if (s_bindname == s_CALLBACK_REASON) {
  91.       xlpbind(s_bindname, Wcb_Get_Callback_Reason_Symbol(cd->reason), lexical_env);
  92.     }
  93.     else if (s_bindname == s_CALLBACK_XEVENT) {
  94.       xlpbind(s_bindname, (cd->event) ? cv_xevent(cd->event) : NIL, lexical_env);
  95.     }
  96.     else {
  97.       extern char temptext[];    /* from winterp.c */
  98.       sprintf(temptext,
  99.           "Unknown binding name in XmAnyCallbackStruct callback evaluator. Valid symbols are [%s %s %s].",
  100.           (char*) getstring(getpname(s_CALLBACK_WIDGET)),
  101.           (char*) getstring(getpname(s_CALLBACK_REASON)),
  102.           (char*) getstring(getpname(s_CALLBACK_XEVENT)));
  103.       xlerror(temptext, s_bindname);
  104.     }
  105.   }
  106. }
  107.  
  108.  
  109. /******************************************************************************
  110.  * This is called indirectly via XtAddCallback() for callbacks returning
  111.  * an XmAnyCallbackStruct as call_data.
  112.  ******************************************************************************/
  113. static void XmAnyCallbackStruct_Callbackproc(widget, client_data, call_data)
  114.      Widget    widget;
  115.      XtPointer client_data;
  116.      XtPointer call_data;
  117. {
  118.   extern void Wcb_Meta_Callbackproc();    /* w_callbacks.c */
  119.  
  120.   Wcb_Meta_Callbackproc(client_data, call_data,
  121.             Lexical_Bindings_For_XmAnyCallbackStruct,
  122.             NULL);
  123. }
  124.  
  125.  
  126. /*****************************************************************************
  127.  * (send <widget_instance> :add_callback <name>
  128.  *       <call_data_binding_names_list>
  129.  *       <code>)
  130.  * returns: <callback_id_object>
  131.  *
  132.  * <name> is a resource keyword of type XmRCallback, eg,
  133.  * :XMN_ACTIVATE_CALLBACK, :XMN_ARM_CALLBACK, :XMN_DISARM_CALLBACK.
  134.  *
  135.  * <call_data_binding_name_list> is a list of symbols that get
  136.  * bound to data specific to the action on the callback widget. For 
  137.  * the XmAnyCallbackStruct passed as call data here, the only valid symbol
  138.  * names are CALLBACK_WIDGET CALLBACK_REASON CALLBACK_XEVENT.
  139.  * 
  140.  * <code> is a list of lisp expressions that are evaluated when the callback
  141.  * occurs. During the callback, the lexical environment that existed for
  142.  * the call to :add_callback will be used for value and functional bindings.
  143.  * 
  144.  * The returned <callback_id_object> may be passed into the 
  145.  * function (remove_callback <callback_id_object>).
  146.  ****************************************************************************/
  147. LVAL Widget_Class_Method_ADD_CALLBACK()
  148. {
  149.   extern LVAL Wcb_Meta_Method_Add_Callback(); /* w_callbacks.c */
  150.  
  151.   return (Wcb_Meta_Method_Add_Callback(XmAnyCallbackStruct_Callbackproc, FALSE));
  152. }
  153.  
  154.  
  155. /*****************************************************************************
  156.  * (send <widget_instance> :set_callback <name>
  157.  *       <call_data_binding_names_list>
  158.  *       <code>)
  159.  * returns: <callback_id_object>
  160.  *
  161.  * This does exactly what method :add_callback does, except that it ensures
  162.  * that the callback currently being set is the only callback on <widget_instance>
  163.  * for <name>.
  164.  *
  165.  * This method is best used for interactively changing callbacks on a widget.
  166.  * It is slightly less efficient than method :add_callback because it must
  167.  * search-for and remove other callbacks on <widget> with the same <name>.
  168.  ****************************************************************************/
  169. LVAL Widget_Class_Method_SET_CALLBACK()
  170. {
  171.   extern LVAL Wcb_Meta_Method_Add_Callback(); /* w_callbacks.c */
  172.  
  173.   return (Wcb_Meta_Method_Add_Callback(XmAnyCallbackStruct_Callbackproc, TRUE));
  174. }
  175.  
  176.  
  177. /*****************************************************************************
  178.  * (send <Widget_Class> :new [:managed/:unmanaged]
  179.  *                           [<name>]
  180.  *                           <parent> 
  181.  *                           [:XMN_<arg1> <val1>]
  182.  *                           [. . .             ]
  183.  *                           [:XMN_<argN> <valN>])
  184.  *
  185.  * For the <widget_class> meta-class (the parent class of all widget-objects), 
  186.  * create a new widget via XtCreateWidget().
  187.  *
  188.  * The optional keyword-argument :managed will cause a subsequent call to
  189.  * XtManageChild(). If the submessage :unmanaged is present, or no submessage,
  190.  * then XtManageChild() won't be called, and the resulting widget will be
  191.  * returned unmanaged.
  192.  ****************************************************************************/
  193. LVAL Widget_Class_Method_ISNEW()
  194. {
  195.   extern void Wcls_Initialize_WIDGETOBJ();
  196.   extern WidgetClass Wcls_WIDGETCLASSOBJ_To_WidgetClassID();
  197.   extern ArgList Wres_Get_LispArglist(); /* from w_resources.c */
  198.   extern void    Wres_Free_C_Arglist_Data(); /* from w_resources.c */
  199.   LVAL self, o_parent;
  200.   char* name;
  201.   Boolean managed_p;
  202.   WidgetClass widgetclass_id;
  203.   Widget widget_id, parent_widget_id;
  204.  
  205.   self = xlgaobject();        /* NOTE: xlobj.c:clnew() returns an OBJECT; if this method
  206.                    returns successfully, it will return a WIDGETOBJ */
  207.  
  208.   /* get optional managed/unmanaged arg */
  209.   if (moreargs() && ((*xlargv == k_managed) || (*xlargv == k_unmanaged)))
  210.     managed_p = (nextarg() == k_managed);
  211.   else
  212.     managed_p = FALSE;        /* by default don't call XtManageChild() */
  213.  
  214.   /* get optional <name> arg */
  215.   if (moreargs() && (stringp(*xlargv)))
  216.     name = (char*) getstring(nextarg());
  217.   else
  218.     name = "";            /* default name */
  219.  
  220.   /* get required <parent> widget-object arg */
  221.   parent_widget_id = Wcls_Get_WIDGETOBJ_Argument_Returning_Validated_WidgetID(&o_parent);
  222.  
  223.   if (!(widgetclass_id = Wcls_WIDGETCLASSOBJ_To_WidgetClassID(getclass(self))))
  224.     xlerror("Expected a 'Class' object that is a subclass of 'WIDGET_CLASS'.", self);
  225.  
  226.   /*
  227.    * Store the widget object <self> in the XmNuserData resource on the
  228.    * widget. This will allow us to retrieve the widget object from Xtoolkit
  229.    * functions returning widget ID's without having to keep around a table
  230.    * of widgetID-->widget-objects.
  231.    */
  232.    ARGLIST_RESET(); ARGLIST_ADD(XmNuserData, (XtArgVal) self); 
  233.  
  234.   if (moreargs()) {        /* if there are more arguments, */
  235.     Cardinal xt_numargs;    /* then we have some extra widget resources to set */
  236.     ArgList xt_arglist = Wres_Get_LispArglist(self, parent_widget_id, ARGLIST(), &xt_numargs);
  237.     widget_id = XtCreateWidget(name, widgetclass_id, parent_widget_id, xt_arglist, xt_numargs);
  238.     Wres_Free_C_Arglist_Data();
  239.   }
  240.   else
  241.     widget_id = XtCreateWidget(name, widgetclass_id, parent_widget_id, ARGLIST());
  242.  
  243.   Wcls_Initialize_WIDGETOBJ(self, widget_id);
  244.  
  245.   if (managed_p)
  246.     XtManageChild(widget_id);
  247.  
  248. #ifdef DEBUG_WINTERP_1
  249.   Wcls_Print_WidgetObj_Info(self);
  250. #endif
  251.   return (self);
  252. }
  253.  
  254.  
  255. #ifdef WINTERP_MOTIF_11
  256. /******************************************************************************
  257.  * (send <compositewidget> :GET_CHILDREN)
  258.  *     ==> returns an array of WIDGETOBJs
  259.  *
  260.  * This retrieves the composite resources XmNitems and XmNitemCount
  261.  * from <listwidget> and returns an array of XmStrings
  262.  * representing the items in the list.
  263.  *******************************************************************************/
  264. LVAL Widget_Class_Method_GET_CHILDREN()
  265. {
  266.   extern LVAL Wcls_WidgetID_To_WIDGETOBJ(); /* w_classes.c */
  267.   LVAL self, result;
  268.   Widget widget_id;
  269.   Widget* widgettab = NULL;
  270.   Cardinal widgettab_size = 0;
  271.   int i;
  272.  
  273.   widget_id = Wcls_Get_WIDGETOBJ_Argument_Returning_Validated_WidgetID(&self);
  274.   xllastarg();
  275.  
  276.   if (!XtIsComposite(widget_id))
  277.     xlerror("Method :GET_CHILDREN only applies to widgets that are subclasses of \"Composite\".", self);
  278.   
  279.   ARGLIST_RESET();
  280.   ARGLIST_ADD(XmNchildren, &widgettab);
  281.   ARGLIST_ADD(XmNnumChildren, &widgettab_size);
  282.   XtGetValues(widget_id, ARGLIST());
  283.  
  284.   if (!widgettab || !widgettab_size)
  285.     return (NIL);
  286.  
  287.   xlsave1(result);
  288.   result = newvector(widgettab_size);
  289.   for (i = 0; i < widgettab_size; i++)
  290.     setelement(result, i, Wcls_WidgetID_To_WIDGETOBJ(widgettab[i]));
  291.   xlpop();
  292.   return (result);
  293. }
  294. #endif /* WINTERP_MOTIF_11 */
  295.  
  296.  
  297. /******************************************************************************
  298.  * (send <widget> :EXISTS_P)
  299.  *     ==> returns T if the widget exists (hasn't been destroyed)
  300.  *    ==> returns NIL if the widget has been destroyed
  301.  *        or has never been initialized.
  302.  *******************************************************************************/
  303. LVAL Widget_Class_Method_EXISTS_P()
  304. {
  305.   extern LVAL true;
  306.   LVAL self = xlga_widgetobj();
  307.   xllastarg();
  308.  
  309.   if (get_widgetobj_widgetID(self))
  310.     return (true);
  311.   else
  312.     return (NIL);
  313. }
  314.  
  315.  
  316. /*****************************************************************************
  317.  * Initialize the Xtoolkit interface. Note that this procedure does
  318.  * equivelent kinds of setup as done by xloinit(). The following call 
  319.  * sequence happens on startup:
  320.  * [xlsymbols(), xloinit()] <-- initwks() <-- xlinit() <-- main()...
  321.  * However, note that main() calls xlinit() only if xlirestore("xlisp.wks") 
  322.  * fails. In that case, we get the calling sequence:
  323.  * obsymbols() <-- xlsymbols() <-- xlirestore() <-- main(). We could patch
  324.  * in the symbols initialized in this module by putting initialization 
  325.  * routines in ossymbols(), but it's not clear that this would make sense:
  326.  * restore will only be able to restore widget objects' data, but will not
  327.  * be able to recreate widgets themselves.
  328.  *
  329.  * Thus, we call this procedure after xlinit() in main() and this reinitializes
  330.  * the widget objects independent of restoring. Of course, any widget objects
  331.  * that were saved/restored may now not have a valid class, since the 
  332.  * pointers may have changed ...
  333.  ****************************************************************************/
  334. Wc_WIDGET_Init()
  335. {
  336.   extern LVAL xlclass();    /* from xlobj.c */
  337.   extern      xladdivar();    /* from xlobj.c */
  338.   extern      xladdmsg();    /* from xlobj.c */
  339.  
  340.   k_managed            = xlenter(":MANAGED");
  341.   k_unmanaged          = xlenter(":UNMANAGED");
  342.   k_dialog             = xlenter(":DIALOG"); /* used by various :isnew methods */
  343.   k_scrolled           = xlenter(":SCROLLED"); /* used by various :isnew methods */
  344.  
  345.   /* 
  346.    * create 'WIDGET_CLASS' by doing the (almost) equivalent of 
  347.    * (setq Widget_Class (send Class :new 
  348.    *                           '(widget_id)
  349.    *                             object))
  350.    * Creating a new 'Class' instance would end up calling clnew() to create
  351.    * a new instance of 'Class', and then call clisnew() on that 'Class'
  352.    * instance to set the appropriate slots for 'WIDGET_CLASS'. Thus we need to
  353.    * create object 'WIDGET_CLASS', and with that object, set
  354.    *    self.MESSAGES = (:SET_CALLBACK :GET_VALUES :SET_VALUES ...)
  355.    *    self.IVARS = (WIDGET_ID SETVALUES_ALIST)
  356.    *    self.CVARS = NIL
  357.    *    self.CVALS = NIL
  358.    *    self.SUPERCLASS = 'Object'
  359.    *    self.IVARCNT = WIDGETOBJ_SIZE     ;; == length(self.IVARS)
  360.    *    self.IVARTOTAL = WIDGETOBJ_SIZE   ;; == self.IVARCNT + length(superclass.IVARS)
  361.    *
  362.    * 'WIDGET_CLASS' contains methods corresponding to common operations on
  363.    * 'Widget' in the Xtoolkit. The :isnew method in 'Widget_Class' is the
  364.    * default means to create a new widget in this system -- this method will
  365.    * look up the WidgetClass pointer from class(self).CVALS[0]. Note that 
  366.    * 'WIDGET_CLASS' is a core class. Widget instances should be created
  367.    * from classes inheriting from 'Widget_Class' The message :isnew will 
  368.    * complain if you try to instantiate 'WIDGET_CLASS' since 
  369.    * class(self).CVALS == NIL for that class only.
  370.    *
  371.    * Specific widget classes, corresponding to a instantiatable widget objects
  372.    * in Motif, are created by doing, for example
  373.    * (setq PUSHBUTTON_CLASS (send Class :new
  374.    *                              '()                 ;; no new IVARS
  375.    *                              '(WIDGET_CLASS_ID   ;; value==xmPushButtonWidgetClass
  376.    *                                WIDGET_CLASS_SYM  ;; value==PUSHBUTTON_CLASS
  377.    *                              Widget_Class)       ;; superclass
  378.    * where WIDGET_CLASS_ID is associated with the WidgetClass pointer
  379.    * designating the class of the widget for the Xtoolkit creation 
  380.    * functions.
  381.    */
  382.  
  383.   /*--------------- create 'Class' instance 'WIDGET_CLASS' -----------------*/
  384.   /* Calling xlclass() creates the 'Class' instance called 'WIDGET_CLASS' and 
  385.      sets IVARCNT, IVARTOTAL, and SUPERCLASS slots
  386.      slots CVARS, CVALS are set to NIL */
  387.   o_WIDGET_CLASS = xlclass("WIDGET_CLASS", WIDGETOBJ_SIZE); 
  388.  
  389.   /* set up the list of ivarnames in IVARS */
  390.   xladdivar(o_WIDGET_CLASS, " _bogus_ivar_ "); /* this "variable name" corresponds to the WIDGETID slot on a WIDGETOBJ 
  391.                                -- users shouldn't access this var, since it isn't an LVAL (hack). */
  392.  
  393.   /* set up the list of methods in MESSAGES, and bind the associated FSUBR */
  394.  
  395. #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT /* template for adding new methods */
  396.   xladdmsg(o_WIDGET_CLASS, ":",
  397.        FTAB_Widget_Class_Method_); /*  */
  398. #endif
  399.  
  400. #ifdef WINTERP_MOTIF_11
  401.   xladdmsg(o_WIDGET_CLASS, ":PROCESS_TRAVERSAL",
  402.        FTAB_Widget_Class_Method_PROCESS_TRAVERSAL); /* w_libXm.c */
  403. #endif /* WINTERP_MOTIF_11 */
  404.  
  405.   xladdmsg(o_WIDGET_CLASS, ":EXISTS_P",
  406.        FTAB_Widget_Class_Method_EXISTS_P); /* wc_WIDGET.c */
  407.  
  408. #ifdef WINTERP_MOTIF_11
  409.   xladdmsg(o_WIDGET_CLASS, ":GET_CHILDREN",
  410.        FTAB_Widget_Class_Method_GET_CHILDREN); /* wc_WIDGET.c */
  411. #endif /* WINTERP_MOTIF_11 */
  412.  
  413.   xladdmsg(o_WIDGET_CLASS, ":BUILD_EVENT_MASK",
  414.        FTAB_Widget_Class_Method_BUILD_EVENT_MASK); /* w_evnthndlr.c */
  415.  
  416.   xladdmsg(o_WIDGET_CLASS, ":OVERRIDE_TRANSLATIONS",
  417.        FTAB_Widget_Class_Method_OVERRIDE_TRANSLATIONS); /* w_txlations.c */
  418.  
  419.   xladdmsg(o_WIDGET_CLASS, ":AUGMENT_TRANSLATIONS",
  420.        FTAB_Widget_Class_Method_AUGMENT_TRANSLATIONS); /* w_txlations.c */
  421.  
  422.   xladdmsg(o_WIDGET_CLASS, ":UNINSTALL_TRANSLATIONS",
  423.        FTAB_Widget_Class_Method_UNINSTALL_TRANSLATIONS); /* w_txlations.c */
  424.  
  425.   xladdmsg(o_WIDGET_CLASS, ":INSTALL_ACCELERATORS",
  426.        FTAB_Widget_Class_Method_INSTALL_ACCELERATORS); /* w_txlations.c */
  427.  
  428.   xladdmsg(o_WIDGET_CLASS, ":INSTALL_ALL_ACCELERATORS",
  429.        FTAB_Widget_Class_Method_INSTALL_ALL_ACCELERATORS); /* w_txlations.c */
  430.  
  431. #ifdef WINTERP_MOTIF_11
  432.   xladdmsg(o_WIDGET_CLASS, ":CALL_ACTION_PROC",
  433.        FTAB_Widget_Class_Method_CALL_ACTION_PROC); /* w_txlations.c */
  434. #endif /* WINTERP_MOTIF_11 */
  435.  
  436.   xladdmsg(o_WIDGET_CLASS, ":REMOVE_ALL_CALLBACKS",
  437.        FTAB_Widget_Class_Method_REMOVE_ALL_CALLBACKS); /* w_callbacks.c */
  438.  
  439.   xladdmsg(o_WIDGET_CLASS, ":HAS_CALLBACKS",
  440.        FTAB_Widget_Class_Method_HAS_CALLBACKS); /* w_callbacks.c */
  441.  
  442.   xladdmsg(o_WIDGET_CLASS, ":ADD_TAB_GROUP",
  443.        FTAB_Widget_Class_Method_ADD_TAB_GROUP); /* w_libXm.c */
  444.  
  445.   xladdmsg(o_WIDGET_CLASS, ":REMOVE_TAB_GROUP",
  446.        FTAB_Widget_Class_Method_REMOVE_TAB_GROUP); /* w_libXm.c */
  447.  
  448.   xladdmsg(o_WIDGET_CLASS, ":UPDATE_DISPLAY", /* w_libXm.c */
  449.        FTAB_Widget_Class_Method_UPDATE_DISPLAY);
  450.  
  451.   xladdmsg(o_WIDGET_CLASS, ":ADD_GRAB",
  452.        FTAB_Widget_Class_Method_ADD_GRAB); /* w_libXt.c */
  453.  
  454.   xladdmsg(o_WIDGET_CLASS, ":REMOVE_GRAB",
  455.        FTAB_Widget_Class_Method_REMOVE_GRAB); /* w_libXt.c */
  456.  
  457.   xladdmsg(o_WIDGET_CLASS, ":IS_COMPOSITE",
  458.        FTAB_Widget_Class_Method_IS_COMPOSITE); /* w_libXt.c */
  459.  
  460.   xladdmsg(o_WIDGET_CLASS, ":IS_CONSTRAINT",
  461.        FTAB_Widget_Class_Method_IS_CONSTRAINT); /* w_libXt.c */
  462.  
  463.   xladdmsg(o_WIDGET_CLASS, ":IS_SHELL",
  464.        FTAB_Widget_Class_Method_IS_SHELL); /* w_libXt.c */
  465.  
  466.   xladdmsg(o_WIDGET_CLASS, ":IS_PRIMITIVE",
  467.        FTAB_Widget_Class_Method_IS_PRIMITIVE); /* w_libXm.c */
  468.  
  469.   xladdmsg(o_WIDGET_CLASS, ":IS_GADGET",
  470.        FTAB_Widget_Class_Method_IS_GADGET); /* w_libXm.c */
  471.  
  472.   xladdmsg(o_WIDGET_CLASS, ":IS_MANAGER",
  473.        FTAB_Widget_Class_Method_IS_MANAGER); /* w_libXm.c */
  474.  
  475.   xladdmsg(o_WIDGET_CLASS, ":SET_SENSITIVE",
  476.        FTAB_Widget_Class_Method_SET_SENSITIVE); /* w_libXt.c */
  477.  
  478.   xladdmsg(o_WIDGET_CLASS, ":SET_MAPPED_WHEN_MANAGED",
  479.        FTAB_Widget_Class_Method_SET_MAPPED_WHEN_MANAGED); /* w_libXt.c */
  480.  
  481.   xladdmsg(o_WIDGET_CLASS, ":IS_MANAGED",
  482.        FTAB_Widget_Class_Method_IS_MANAGED); /* w_libXt.c */
  483.  
  484.   xladdmsg(o_WIDGET_CLASS, ":IS_REALIZED",
  485.        FTAB_Widget_Class_Method_IS_REALIZED); /* w_libXt.c */
  486.  
  487.   xladdmsg(o_WIDGET_CLASS, ":IS_SENSITIVE",
  488.        FTAB_Widget_Class_Method_IS_SENSITIVE); /* w_libXt.c */
  489.  
  490. #ifdef WINTERP_MOTIF_11        /* actually, just X11r4, but Motif1.1-->X11r4 */
  491.   xladdmsg(o_WIDGET_CLASS, ":NAME",
  492.        FTAB_Widget_Class_Method_NAME); /* w_libXt.c */
  493. #endif /* WINTERP_MOTIF_11 */
  494.  
  495.   xladdmsg(o_WIDGET_CLASS, ":PARENT",
  496.        FTAB_Widget_Class_Method_PARENT); /* w_libXt.c */
  497.  
  498.   xladdmsg(o_WIDGET_CLASS, ":WINDOW",
  499.        FTAB_Widget_Class_Method_WINDOW); /* w_libXt.c */
  500.  
  501.   xladdmsg(o_WIDGET_CLASS, ":MAP",
  502.        FTAB_Widget_Class_Method_MAP); /* w_libXt.c */
  503.  
  504.   xladdmsg(o_WIDGET_CLASS, ":UNMAP",
  505.        FTAB_Widget_Class_Method_UNMAP); /* w_libXt.c */
  506.  
  507.   xladdmsg(o_WIDGET_CLASS, ":SET_EVENT_HANDLER",
  508.        FTAB_Widget_Class_Method_SET_EVENT_HANDLER);    /* w_evnthndlr.c */
  509.  
  510.   xladdmsg(o_WIDGET_CLASS, ":ADD_EVENT_HANDLER",
  511.        FTAB_Widget_Class_Method_ADD_EVENT_HANDLER);    /* w_evnthndlr.c */
  512.  
  513.   xladdmsg(o_WIDGET_CLASS, ":SET_CALLBACK",
  514.        FTAB_Widget_Class_Method_SET_CALLBACK);
  515.  
  516.   xladdmsg(o_WIDGET_CLASS, ":ADD_CALLBACK",
  517.        FTAB_Widget_Class_Method_ADD_CALLBACK);
  518.  
  519.   xladdmsg(o_WIDGET_CLASS, ":DESTROY", /* w_libXt.c */
  520.        FTAB_Widget_Class_Method_DESTROY);
  521.  
  522.   xladdmsg(o_WIDGET_CLASS, ":MANAGE", /* w_libXt.c */
  523.        FTAB_Widget_Class_Method_MANAGE);
  524.  
  525.   xladdmsg(o_WIDGET_CLASS, ":UNMANAGE",    /* w_libXt.c */
  526.        FTAB_Widget_Class_Method_UNMANAGE);
  527.  
  528.   xladdmsg(o_WIDGET_CLASS, ":GET_VALUES", /* w_libXt.c */
  529.        FTAB_Widget_Class_Method_GET_VALUES);    
  530.  
  531.   xladdmsg(o_WIDGET_CLASS, ":SET_VALUES", /* w_libXt.c */
  532.        FTAB_Widget_Class_Method_SET_VALUES);
  533.  
  534.   xladdmsg(o_WIDGET_CLASS, ":ISNEW",
  535.        FTAB_Widget_Class_Method_ISNEW);
  536. }
  537.